home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Sample Code / Newton Sample Code 1.1 / Sound / Simple Dialer-1 / DialerProj.text < prev    next >
Encoding:
Text File  |  1994-03-07  |  2.8 KB  |  93 lines  |  [TEXT/MPS ]

  1. // Copyright © 1993,4 Apple Computer, Inc. All rights reserved
  2.  
  3. // application constants
  4. constant kAppSymbol := '|Dialer:PIEDTS| ;
  5. // ---- End Project Data ----
  6.  
  7.  
  8. // ---- File DialerMainLayout ----
  9.  
  10. // Before Script for "theMainView"
  11. // Copyright © 1993,4 Apple Computer, Inc. All rights reserved
  12.  
  13. theMainView :=
  14.    {viewFlags: 1,
  15.     viewFormat: 336,
  16.     viewBounds: {top: 64, left: 4, right: 140, bottom: 264},
  17.     title: "Dialer",
  18.     _proto: protoFloatNGo,
  19.     debug: "theMainView"
  20.    };
  21.  
  22. presetDialButton := /* child of theMainView */
  23.    {text: "Call  Todd",
  24.     buttonClickScript:
  25.       func()
  26.       begin
  27.          GetRoot():Dial("4269312",userconfiguration.currentDialSpeaker);
  28.       end,
  29.     viewBounds: {left: 35, top: 19, right: 99, bottom: 59},
  30.     viewFlags: 515,
  31.     _proto: protoTextButton,
  32.     debug: "presetDialButton"
  33.    };
  34. // View presetDialButton is declared to theMainView
  35.  
  36.  
  37.  
  38. phonePad := /* child of theMainView */
  39.    {
  40.     keyDefinitions:
  41.       // the phone keypad
  42.       // the string will eventually be returned on a key press
  43.       // the then sent to :Dial
  44.       [
  45.          [keyVUnit, keyVUnit,
  46.                       "1",  "1",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  47.                       "2",  "2",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  48.           "3",  "3",  keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3],
  49.       
  50.          [keyVUnit, keyVUnit,
  51.                       "4",  "4",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  52.                       "5",  "5",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  53.           "6",  "6",  keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3],
  54.       
  55.          [keyVUnit, keyVUnit,
  56.                       "7",  "7",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  57.                       "8",  "8",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  58.           "9",  "9",  keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3],
  59.       
  60.          [keyVUnit, keyVUnit,
  61.                       "*",  "*",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  62.                       "0",  "0",        keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3,
  63.           "#",  "#",  keyHUnit + keyVUnit + keyFramed + keyAutoHilite + keyRoundingUnit*3],
  64.       
  65.       
  66.       ],
  67.     viewBounds: {left: 25, top: 81, right: 121, bottom: 161},
  68.     viewClickScript:
  69.       func(unit)
  70.       begin
  71.       end,
  72.     keyPressScript:
  73.       func(key)
  74.       begin
  75.           // just dial based on the string returned from the key
  76.           // use the current dialing speaker, so could dial from
  77.           // the serial port
  78.           :Dial(key,userconfiguration.currentDialSpeaker);
  79.       end,
  80.     _proto: protoKeypad,
  81.     debug: "phonePad"
  82.    };
  83. // View phonePad is declared to theMainView
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91. // ---- Beginning of section for non used Layout files ----
  92.  
  93. // End of output